// 把home也所有的请求都写到home.js
import http from "./request";
import qs from 'qs'

//封装loging
// 封装一个登录接口
export const loginApi = (params) =>http.post('users/login',params)
//封装注册
export const enroll  = (params) =>http.post('users/register',params)
//封装数据请求
export const getNInformation= (params) =>http.get('profiles',{params})
//封装用户信息
export const getName= (params) =>http.get('users/current',{params})
//封装添加数据
export const getAdd=(params)=>http.post('profiles/add',params)
//封装删除
export const getRem=(params)=>http.delete(`profiles/delete/${params.id}`)
//封装修改
export const getEdit=(params)=>http.post(`profiles/edit/${params.id}`,params)